#ifndef _TESTOPENAPIXX_H_
#define _TESTOPENAPIXX_H_

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <list>

typedef int(*TestFunc)();

#define OPENAPIXXTEST_PR {cout<<"Test failed! "<<__FILE__ <<" " << __LINE__<<endl; return -1;}

// 检查返回值等于0，否则print错误信息并return -1
#define EQU_0_PR(x) {if((x) != 0) OPENAPIXXTEST_PR }

// 检查返回值不等于0，否则print错误信息并return -1
#define NEQ_0_PR(x) {if((x) == 0) OPENAPIXXTEST_PR }

#define EQU_T_PR(x) {if((x) != true) OPENAPIXXTEST_PR }
#define EQU_F_PR(x) {if((x) != false) OPENAPIXXTEST_PR }

// 检查返回值等于0，否则exit
#define EQU_0_E(x) {if((x) != 0) { exit(1);}}

#endif//_TESTOPENAPIXX_H_
